<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>用户管理系统</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<link href="Success.css" rel="stylesheet" type="text/css">
	<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
	<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=IrvvMGT2E0khbG2b8pBTEHGiMkKU9CTR"></script>
</head>
<body bgcolor="#BFE">
	<div id="tit">
		<h1>用户管理系统</h1>
	</div>
	<div class="outside"></div>
	<div id="User">
		<p id="Username"></p>
		<p id="Email"></p>
		<p id="RegistTime"></p>
		<div id="new">
			<a href="LogIn.html">登录</a>
			<a href="SignIn.html">注册</a>
		</div>
	</div>
	<div id="allmap"></div>
<script>
    $(document).ready(function () {
    	var map = new BMap.Map("allmap");    // 创建Map实例
		map.centerAndZoom(new BMap.Point(116.404, 39.915), 11);  // 初始化地图,设置中心点坐标和地图级别
		//添加地图类型控件
		map.addControl(new BMap.MapTypeControl({
		mapTypes:[
            BMAP_NORMAL_MAP,
            BMAP_HYBRID_MAP
        ]}));	  
		map.setCurrentCity("北京");          // 设置地图显示的城市 此项是必须设置的
		map.enableScrollWheelZoom(true);


    	var url = location.search; //获取url中"?"符后的字串
        var theRequest = new Object();
        if (url.indexOf("?") != -1) {
        var str = url.substr(1);
        strs = str.split("&");
        for(var i = 0; i < strs.length; i ++) {
            theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
    	}
    	var username = theRequest["username"];
       	var b = localStorage.getItem(username);
		var data = JSON.parse(b);
		$("#Username").text("用户名:"+username);
		$("#Email").text("邮箱:"+data.email);
		$("#RegistTime").text("注册时间:"+data.date.replace(/.252Z/, ""));
    }else{
    	$("#new").show();
    }});
</script>
</body>
</html>